package com.bwie.es;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import javafx.scene.input.DataFormat;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @BelongsProject: E-Commerce-Month-01
 * @BelongsPackage: com.bwie.es
 * @Author: asus
 * @CreateTime: 2025-10-31  18:25
 * @Description:
 * @Version: 1.0
 */
@Data
@Document(indexName = "es_type",shards = 1,replicas = 1)
public class EsTypeVo {
    /**
     * 分类id
     */
    @Field(type = FieldType.Long)
    private Long typeId;

    /**
     * 分类名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String typeName;

    /**
     * 分类图片
     */
    @Field(type = FieldType.Text)
    private String typeImage;

    /**
     * 排序
     */
    @Field(type = FieldType.Integer)
    private Integer typeTop;

    /**
     * 状态：0显示1隐藏
     */
    @Field(type = FieldType.Integer)
    private Integer typeStatus;

    /**
     * 父级id
     */
    @Field(type = FieldType.Integer)
    private Integer typePid;

    /**
     * 级别：1，2，3
     */
    @Field(type = FieldType.Integer)
    private Integer typeLevel;

    /**
     * 创建人
     */
    @Field(type = FieldType.Integer)
    private Integer createBy;

    /**
     * 创建时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /**
     * 更新人
     */
    @Field(type = FieldType.Integer)
    private Integer updateBy;

    /**
     * 更新时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /**
     * 删除标识 0未删除 1已删除
     */
    @Field(type = FieldType.Integer)
    private Integer deleteFlag;

    /**
     * 删除时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deleteDate;

    private static final long serialVersionUID = 1L;
}
